<template>
<div>
 <h1>测试题</h1>
 <Math v-for="(item,index) in arr" :key="index" :obj="item" @result="resultPar" :index="index"/>
 <Result v-for="(item,index) in arr" :key="index" :res="item" :index="index"/>
</div>
 
</template>

<script>
import Math from './components/Math.vue'
import Result from './components/Result.vue'
export default {
  components:{
    Math,
    Result
  },
  data(){
    return{
      arr:['未完成','未完成','未完成','未完成','未完成']
    }
  },
  methods:{
    resultPar(res,i){
      // this.arr[i]=res
      this.$set(this.arr,i,res)
    }
  }
}
</script>

<style>

</style>